#include "mystdio.h"
#include <string.h>
#include <stdio.h>
#include <unistd.h>

int main()
{
    Myfile* f=Myfopen("log.txt","a");
    if(f==NULL)
    {
        printf("myopen error\n");
        return 1;
    }


   // char* msg=(char*)"mighty action x!\n";

   // Mywrite(f,msg,strlen(msg));
   //
     int cnt= 5;
     while(cnt--)
     {
         char* msg=(char*)"taddle quest";

         Mywrite(f,msg,strlen(msg));
         Myfflush(f);

         printf("%s\n",f->outbuffer);
         sleep(1);
     }

    Myfclose(f);
    return 0;
}
